/* Copyright (c) Soon.Liao 2024. All rights reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * Create Date : 2024
 * @Date: 2024-10-14 07:57:06
 * @LastEditors: soon.liao
 * @LastEditTime: 2024-10-26 14:02:16
 * @FilePath: /src/application/ws63/rgb_master/common/cmd_json.h
 * @Description: NA
 * NA
 */
#ifndef CMD_JSON_H
#define CMD_JSON_H

#define CMD_TYPE "type"
#define CMD_TYPE_SLE "sle"
#define CMD_TYPE_WIFI_CMD "wifi_cmd"
#define CMD_TYPE_LED_NUM "led_num"
#define CMD_TYPE_WIFI_INFO "wifi_info"
#define CMD_TYPE_BRIGHTNESS "brightness"
#define CMD_TYPE_PAJ7620U2 "paj7620u2"
#define CMD_NAME_CMD "cmd"
#define CMD_NAME_SSID "ssid"
#define CMD_NAME_PASSWD "passwd"
#define CMD_NAME_VALUE "value"
#define CMD_TOGGLE_LED "toggleLed"
#define CMD_PREV_MODE "prevMode"
#define CMD_NEXT_MODE "nextMode"
#define CMD_PREV_SENCE "prevSence"
#define CMD_NEXT_SENCE "nextSence"

#define CMD_TOGGLE_LED_LEN 9
#define CMD_PREV_MODE_LEN 8
#define CMD_NEXT_MODE_LEN 8
#define CMD_PREV_SENCE_LEN 9
#define CMD_NEXT_SENCE_LEN 9

int create_json_wifi_cammand(char *string);
int create_json_wifi_info(char *ssid, char *password);
int create_json_wifi_led_num(char *string);
int create_json_wifi_brightness(char *string);
int create_json_paj7620u2_cammand(char *string);
int parse_json_wifi_info(char *json_string);
int parse_json_wifi_led_num(char *json_string);
int parse_json_wifi_brightness(char *json_string);
int parse_json_cammand(char *json_string);

#endif
